export const request = (params) => {
  return new Promise((resolve, reject) => {
    let baseUrl = "http://192.168.2.139:8091/fandemi-applet/"
    uni.request({
      url: baseUrl + params.url, 
      data: params.data,
      method: params.method,
      header: {
        'content-type': "application/x-www-form-urlencoded"
      },
      success(res) {
        resolve(res.data)
      },
      fail(err) {
        reject(err);
        uni.showToast({
          title: '暂无数据!',
          icon: 'none'
        })
      }
    })
  })
}